<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .father {
      width: 300px;
      height: 100px;
      border: 1px solid #f00;
      display: flex;
      background: khaki;
    }

    .son {
      /* flex 伸缩盒 */
      flex: 1;
    }

    .son:nth-child(1) {
      flex: 2;
      background-color: aqua;
    }

    .son:nth-child(2) {
      background-color: hotpink;
    }

    .son:nth-child(3) {
      background-color: yellowgreen;
    }
  </style>
</head>

<body>
  <h1>flex属性其实是一个复合属性</h1>
  <div class="father">
    <div class="son">11</div>
    <div class="son">22</div>
    <div class="son">33</div>
  </div>
</body>

</html>